export default function ({
  $axios,
  redirect
}) {
  $axios.onRequest(config => {
    console.log('Making request to ' + config.url)
  });
  $axios.onResponse(response => {
    console.log('Making response to ' + response.data)
    if (response.status == 200) {
      return response.data;
    }
  });
  $axios.onError(error => {
    const code = parseInt(error.response && error.response.status)
    switch (code) {
      case 404:
        break;
      case 500:
        break;
    }
  });
}
